<div id ="aside" class = "sidebar"> 
	{% include "search.html" %}
	<ul>
		<li>
			<h3>Bulletin Board</h3>
				<ul>
				<li>
				{{blog.blognotice|escape}}
				</li>
				</ul>
		</li>
	</ul>
	<ul>
		<li>
			<h3>Latest Articles</h3>
				{% if blog.recentposts %}
				<ul>
					{% for entry in blog.recentposts %}
					<li><a href="/{{entry.link|escape}}" title="{{entry.title|escape}}">{{entry.title|escape}}({{entry.readtimes}})</a></li>
					{%endfor%}
				</ul>
				{% endif %}
		</li>
	</ul>

	<ul>
		<li>
			<h3>Popular Articles</h3>
			{% if blog.hotposts %}
				<ul>
				{% for entry in blog.hotposts %}
				<li><a href="/{{entry.link|escape}}" title="{{entry.title|escape}}">{{entry.title|escape}}({{entry.readtimes}})</a></li>
				{%endfor%}
				</ul>
				{% endif %}
		</li>
	</ul>

	<ul>
		<li>
			<h3>Article Categories</h3>
			{% if categories %}
				<ul>
				{%for cate in categories%}
				<li><a href="/category/{{cate.slug}}"title = "{{cate.count}} of {{cate.name}}">{{cate.name}}({{cate.count}})</a></li>
				{%endfor%}
				</ul>
			{% endif %}
		</li>
	</ul>


	<ul>
		<li>
			<h3>Archive</h3>
				{% if archives %}
				<ul>
					{%for archive in archives%}
					<li><a href="/{{archive.year}}/{{archive.month}}" title = "{{archive.year}} Y,{{archive.month}}M">{{archive.year}}Y{{archive.month}}M({{archive.entrycount}})Articles</a>
					</li>
					{%endfor%}
				</ul>
				{% endif %}
		</li>
	</ul>

	<ul>
		<li class="widget widget_tag_cloud">
		<h3>Tag Cloud</h3>
		<div class = "dline">
			{% if alltags %}
			{% for t in alltags %}
				<a style="font-size:{{ t.tagcount|add:9 }}px;" title="{{ t.tagcount }} pages of {{t.tag}}" 
						href="/tag/{{t.tag|urlencode}}">{{t.tag}}</a>
			{%endfor%}
			{% endif %}
		</li>
	</ul>
	<!-- color tag -->
	<script type="text/javascript">
        $(".widget_tag_cloud div a").each(function (i) {
            this.style.color = randomColor()
        });
        function randomColor() {
            var arrHex = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
            var strHex = "#";
            var index;
            for (var i = 0; i < 6; i++) {
                index = Math.round(Math.random() * 15);
                strHex += arrHex[index];
            }
            return strHex;
        }
    
	</script>


	<ul>
		<li id="recentcomments">
			<h3>Last reviewed</h3>
			<ul>
				{% for comment in recent_comments %}
				<li>
				<a href="/{{comment.entry.link}}#comment-{{comment.key.id}}" title="Posted at：{{comment.entry.title|escape}}">{{comment.author}}</a>&nbsp;Say：{{comment.shortcontent}}...
				</li>
				{%endfor%}
			</ul>

		</li>
	</ul>
	<ul>
		<li>
			<h3>Quick Links</h3>
			<ul>
				<li>
				<a href="{{ blog.feedurl }}" title="Please use RSS 2.0 to synch this content">RSS <abbr title="Really Simple Syndication">Subscription</abbr></a>
				</li>
				<li>
					<a rel="nofollow" href="/sitemap">Sitemap</a>
				</li>
			</ul>
		</li>
	</ul>
	<ul>
		<li>
			<h3>Links</h3>
			<ul>
			{%for link in blogroll%}
				<li>
					<a href="{{link.href}}" target="_blank" title ="{{link.linkcomment}}">{{link.linktext}}</a>
				</li>
            {%endfor%}
			</ul>
		</li>
	</ul>
</div>